package com.ht.temp.controller;


import com.ht.temp.entity.DayReport;
import com.ht.temp.service.IDayReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author mayke_zhou
 * @since 2018-12-24
 */
@RestController
@RequestMapping("/dayController")
public class DayReportController {

    @Autowired
    private IDayReportService dayReportService;


    @RequestMapping(value = "/getDayReportByMonths",method = RequestMethod.POST)
    public List<DayReport> getDayReportByMonths(Integer deviceId, String startTime, String endTime){
      return  dayReportService.getDayReportByMonths(deviceId,startTime,endTime);
    }


    @RequestMapping(value = "/getMouthReport",method = RequestMethod.GET)
    public List<DayReport> getMouthReport(String searchMouth,Integer deviceId){
        return  dayReportService.selectMouthReport(searchMouth,deviceId);
    }

}
